var ns;
var app = new Vue({
    el: '#app',
    data: {
      count:0,
      TotalAmount:0,
      RefundAmount:0,
      busData:{},
      BusinessStatus:'营业',
      domainURL: CONFIG.url,
    },
methods:{
  get_data:function(){
    var that = this;
    var option={};
    option.action="homebusinessinfo";
    ns.post(option, function(succeed, data, err) {
      if (succeed) {
         //alert(JSON.stringify(data));
         that.busData=data.businessinfo;
        }
    });
  },
  open_shopmsg: function(item) {
      var that = this;
      ns.openWin('dl_shopmsg_frm', '商家信息', {
          id:that.busData.id,
          searchtype: 21
      });
    },
    open_zhanghulist: function(item) {
        var that = this;
        ns.openWin('dl_zhanghulist', '子账户', {
            id: 0,
        });
      },
      open_xitongsz: function(item) {
          var that = this;
          ns.openWin('dl_xitongsz', '系统设置', {
              id: 0,
          });
        },
  }
});
apiready = function() {
    api.parseTapmode();
    ns = window.Foresight.Util;
    app.get_data();
    api.addEventListener({
        name: 'onlogin'
    }, function(ret, err){
      app.get_data();
    });
    api.addEventListener({
        name: 'shopmsgevent'
    }, function(ret, err){
          app.get_data();
    });
};
